<?php
require("cfg.php");
require("function.php");
$sql="SELECT `song_name` ,`song_path`, count( `song_name` ) 
FROM `commend_record` 
GROUP BY `song_name`
ORDER BY count( `song_name` ) DESC 
LIMIT 0 , 30 ";
echo '<form id="top_played" action="" method="post" name="top_played_form">'."\r\n";
$query=mysql_query($sql);
while ($row = mysql_fetch_array($query)) {
	echo("<label>\r\n");
	$song_name=iconv("gb2312","utf-8",$row["song_name"]);
	$song_path=iconv("gb2312","utf-8",$row["song_path"]);
	$song_count=$row["count( `song_name` )"];
	
	echo "\t<input type=\"checkbox\" value=\"$song_path\" name=\"$song_name\"/>$song_name($song_count)\r\n";
	echo("</label>\r\n");
}
echo("</form>");

?>